//
//  WUMyHighlightcell.m
//  Home
//
//  Created by 吴军虎吴军虎 on 16/5/5.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "WUMyHighlightcell.h"

@interface WUMyHighlightcell()

@property (nonatomic,retain)UILabel *nameL;
@property (nonatomic,retain)UILabel *nameTL;
@property (nonatomic,retain)UILabel *textL;
@property (nonatomic,retain)UILabel *textT;
@property (nonatomic,retain)UILabel *modernlabel;
@property (nonatomic,retain)UILabel *yuanlabel;
@property (nonatomic,retain)UILabel *pinglabel;
@property (nonatomic,retain)UILabel *hanglabel;
@property (nonatomic,retain)UILabel *nianlabel;
@property (nonatomic,retain)UILabel *nvlabel;

@end

@implementation WUMyHighlightcell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    return self;
}
- (void)creatView{
    
    self.contentView.backgroundColor = LV;
    _nameL = [UILabel new];
    _nameL.text = @"任务要求";
    _nameL.textColor = GH;
    _nameL.font = [UIFont fontWithName:TFont size:TEXTCONTENTFONT * AUTO_WIDTH];
    [self.contentView addSubview:_nameL];
    [_nameL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(5 * AUTO_HEIGHT);
        make.height.mas_equalTo(70/2 * AUTO_HEIGHT);
        make.left.mas_equalTo(15 * AUTO_WIDTH);
        
    }];
    
    UIImageView *image = [UIImageView new];
    [self.contentView addSubview:image];
    image.image = [UIImage imageNamed:@"yao"];
    [image mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_nameL).offset(4 *AUTO_HEIGHT);
        make.right.mas_equalTo(self).offset(- 15 * AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(25 * AUTO_WIDTH, 25* AUTO_HEIGHT));
        
    }];
    
    
    
    
    UIImageView *li = [UIImageView new];
    li.image = [UIImage imageNamed:@"虚线"];
    [self.contentView addSubview:li];
    [li mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_nameL.mas_bottom).offset(0/2 * AUTO_HEIGHT);
        make.left.mas_equalTo(1 * AUTO_WIDTH);
        make.height.mas_equalTo(1.5 * AUTO_HEIGHT);
        make.right.mas_equalTo(-1 * AUTO_WIDTH);
        
    }];
    
    
    
    
    
    _nameTL = [UILabel new];
    [self.contentView addSubview:_nameTL];
    _nameTL.text = @"平层户型";
    _nameTL.textColor = GH;
    _nameTL.font = [UIFont fontWithName:TFont size:TEXTCONTENTFONT * AUTO_WIDTH];
    
    [_nameTL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_nameL.mas_bottom).offset(14 * AUTO_HEIGHT);
        make.height.mas_equalTo(20 * AUTO_HEIGHT);
        make.left.mas_equalTo(_nameL);
        
    }];
    
    
    UILabel *henglabel=[[UILabel alloc]init];
    henglabel.backgroundColor=[UIColor grayColor];
    henglabel.alpha=0.6;
    [self.contentView addSubview:henglabel];
    [henglabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.mas_equalTo(_nameL.mas_bottom).offset(17 *AUTO_HEIGHT);
        make.left.mas_equalTo(_nameTL.mas_right).offset(8 *AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(1 *AUTO_WIDTH, 14 *AUTO_HEIGHT));
        
    }];
    
    
    _modernlabel=[[UILabel alloc]init];
    _modernlabel.text=@"现代简约";
    _modernlabel.textColor=[UIColor grayColor];
    _modernlabel.alpha=0.6;
    _modernlabel.font=[UIFont systemFontOfSize:14];
    [self.contentView addSubview:_modernlabel];
    [_modernlabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.mas_equalTo(_nameL.mas_bottom).offset(14 *AUTO_HEIGHT);
        make.height.mas_equalTo(20 *AUTO_HEIGHT);
        make.left.equalTo(henglabel.mas_right).offset(8 *AUTO_WIDTH);
    }];
    
    
    //钱的图片
    UIImageView *biImage=[[UIImageView alloc]init];
    biImage.image=[UIImage imageNamed:@"find_RMB"];
    [self.contentView addSubview:biImage];
    [biImage mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(_nameL.mas_bottom).offset(16 *AUTO_HEIGHT);
        make.height.mas_equalTo(15 *AUTO_HEIGHT);
        make.right.equalTo(self.contentView).offset(-80 *AUTO_WIDTH);
    }];
    
    
    //30-50
    _yuanlabel=[[UILabel alloc]init];
    _yuanlabel.text=@"30-50";
    _yuanlabel.textColor=[UIColor redColor];
    _yuanlabel.alpha=0.6;
    _yuanlabel.font=[UIFont systemFontOfSize:16];
    [self.contentView addSubview:_yuanlabel];
    [_yuanlabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(_nameL.mas_bottom).offset(14 *AUTO_HEIGHT);
        make.height.mas_equalTo(20 *AUTO_HEIGHT);
        make.right.equalTo(self.contentView).offset(-30 *AUTO_WIDTH);
    }];
    
    
    //平方米
    UIImageView *fangImage=[[UIImageView alloc]init];
    fangImage.image=[UIImage imageNamed:@"area"];
    [self.contentView addSubview:fangImage];
    [fangImage mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(_nameTL.mas_bottom).offset(5 *AUTO_HEIGHT);
        make.left.equalTo(_nameL);
        make.height.mas_equalTo(15 *AUTO_HEIGHT);
    }];
    
    //110㎡
    _pinglabel=[[UILabel alloc]init];
    _pinglabel.textColor=[UIColor grayColor];
    _pinglabel.alpha=0.6;
    _pinglabel.text=@"110㎡";
    _pinglabel.font=[UIFont systemFontOfSize:13];
    [self.contentView addSubview:_pinglabel];
    [_pinglabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(_nameTL.mas_bottom).offset(5 *AUTO_HEIGHT);
        make.left.equalTo(fangImage.mas_right).offset(3 *AUTO_WIDTH);
        make.height.mas_equalTo(15 *AUTO_HEIGHT);
    }];
    
    
    
    //定位图片
    UIImageView *diImage=[[UIImageView alloc]init];
    diImage.image=[UIImage imageNamed:@"di"];
    [self.contentView addSubview:diImage];
    [diImage mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(_nameTL.mas_bottom).offset(5 *AUTO_HEIGHT);
        make.left.equalTo(_pinglabel.mas_right).offset(15 *AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(15 *AUTO_WIDTH, 15 *AUTO_HEIGHT));
    }];
    
    
    //杭州
    _hanglabel=[[UILabel alloc]init];
    _hanglabel.text=@"杭州";
    _hanglabel.textColor=[UIColor grayColor];
    _hanglabel.alpha=0.6;
    _hanglabel.font=[UIFont systemFontOfSize:13];
    [self.contentView addSubview:_hanglabel];
    [_hanglabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(_nameTL.mas_bottom).offset(5 *AUTO_HEIGHT);
        make.left.equalTo(diImage.mas_right).offset(3 *AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(30 *AUTO_WIDTH, 15 *AUTO_HEIGHT));
        
    }];
    
    //包的图片
    UIImageView *NImage=[[UIImageView alloc]init];
    NImage.image=[UIImage imageNamed:@"jingyan"];
    [self.contentView addSubview:NImage];
    [NImage mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(_nameTL.mas_bottom).offset(5 *AUTO_HEIGHT);
        make.left.equalTo(_hanglabel.mas_right).offset(15 *AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(15 *AUTO_WIDTH, 15 *AUTO_HEIGHT));
        
    }];
    
    //1-2年
    _nianlabel=[[UILabel alloc]init];
    _nianlabel.text=@"1-2年";
    _nianlabel.textColor=[UIColor grayColor];
    _nianlabel.alpha=0.6;
    _nianlabel.font=[UIFont systemFontOfSize:13];
    [self.contentView addSubview:_nianlabel];
    [_nianlabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(_nameTL.mas_bottom).offset(5 *AUTO_HEIGHT);
        make.left.equalTo(NImage.mas_right).offset(3 *AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(35 *AUTO_WIDTH, 15 *AUTO_HEIGHT));
    }];
    
    //女的图片
    UIImageView *NVImage=[[UIImageView alloc]init];
    NVImage.image=[UIImage imageNamed:@"nv"];
    [self.contentView addSubview:NVImage];
    [NVImage mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(_nameTL.mas_bottom).offset( 5 *AUTO_HEIGHT);
        make.left.equalTo(_nianlabel.mas_right).offset(15 *AUTO_WIDTH);
        make.size.mas_offset(CGSizeMake(15 *AUTO_WIDTH, 15 *AUTO_HEIGHT));
    }];
    
    //女
    _nvlabel=[[UILabel alloc]init];
    _nvlabel.text=@"女";
    _nvlabel.textColor=[UIColor grayColor];
    _nvlabel.alpha=0.6;
    _nvlabel.font=[UIFont systemFontOfSize:13];
    [self.contentView addSubview:_nvlabel];
    [_nvlabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(_nameTL.mas_bottom).offset(5 *AUTO_HEIGHT);
        make.left.equalTo(NVImage.mas_right).offset(3 *AUTO_WIDTH);
        make.size.mas_equalTo(CGSizeMake(35 *AUTO_WIDTH, 15 *AUTO_HEIGHT));
    }];
    
    UIImageView *xuImage = [UIImageView new];
    xuImage.image = [UIImage imageNamed:@"虚线"];
    [self.contentView addSubview:xuImage];
    [xuImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_pinglabel.mas_bottom).offset(24/2 * AUTO_HEIGHT);
        make.left.mas_equalTo(1 * AUTO_WIDTH);
        make.height.mas_equalTo(1.5 * AUTO_HEIGHT);
        make.right.mas_equalTo(-1 * AUTO_WIDTH);
        
    }];
    

    
    _textL = [UILabel new];
    _textL.backgroundColor = GH;
    _textL.layer.masksToBounds = YES;
    _textL.text = @"需要跟单";
    _textL.font =  [UIFont fontWithName:TFont size:TEXTALITTLEFONT * AUTO_WIDTH];
    _textL.textAlignment = NSTextAlignmentCenter;
    _textL.layer.cornerRadius = 4 * AUTO_HEIGHT;
    _textL.textColor = [UIColor whiteColor];
    [self.contentView addSubview:_textL];
    [_textL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(xuImage.mas_bottom).offset(8 * AUTO_HEIGHT);
        make.left.mas_equalTo(_nameL);
        make.height.mas_equalTo(20 * AUTO_HEIGHT);
        make.width.mas_equalTo(70 * AUTO_WIDTH);
    }];
    
    
    _textT = [UILabel new];
    _textT.backgroundColor = GH;
    _textT.layer.masksToBounds = YES;
    _textT.text = @"需要施工";
    _textT.font =  [UIFont fontWithName:TFont size:TEXTALITTLEFONT * AUTO_WIDTH];
    _textT.textAlignment = NSTextAlignmentCenter;
    _textT.layer.cornerRadius = 4 * AUTO_HEIGHT;
    _textT.textColor = [UIColor whiteColor];
    [self.contentView addSubview:_textT];
    [_textT mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(xuImage.mas_bottom).offset(8 * AUTO_HEIGHT);
        make.left.equalTo(_textL.mas_right).offset(3 *AUTO_WIDTH);
        make.height.mas_equalTo(20 * AUTO_HEIGHT);
        make.width.mas_equalTo(70 * AUTO_WIDTH);
    }];

}

@end
